package day04;

import java.util.Scanner;

/**
 * 说明:
 *
 * @author: luohaowei
 * @date:2023/2/15
 **/
public class sdx {
    public static void main(String[] args) {
        /*
        Scanner scan= new Scanner(System.in);

        System.out.println("请输入你的年龄");
        int age=scan.nextInt();
        System.out.println("请输入你的商品价格");
        double price= scan.nextDouble();
        System.out.println("年龄为:"+age+",价格为"+price);

        Scanner scan1=new Scanner(System.in);
        System.out.println("请选择功能:1.存款 2.取款 3.转账 4.退出");
        int comman=scan.nextInt();
        switch (comman){
            case 1:
                System.out.println("存款业务...");
            break;
            case 2:
                System.out.println("取款业务...");
                break;
            case 3:
                System.out.println("转账业务...");
                break;
            case 4:
                System.out.println("退出成功");
                break;
            default:
                System.out.println("输入错误");
        }
            int num=1;
            while (num<=9){
                System.out.println(num+"*9="+num*9);
                num++;
            }
            System.out.println("继续执行...");
            //输出5次"行动是成功的阶梯":
            int times=0;//循环的变量
            while (times<5){//循环变化的初始化
                System.out.println("行动是成功的阶梯");
                times++;//循环变量的改变
            }
            /*
            执行过程:--带数
                        times=0
                 true   输出  times=1
                 true   输出  times=2
                 true   输出  times=3
                 true   输出  times=4
                 true   输出  tiems=5
                 false      结束
             */
        /*
        int num=0;
        int guess;
        do{
            System.out.println("猜吧");
            guess = scan.nextInt();
        }while (guess!=num);
        if(guess>num){
            System.out.println("猜大了");
        } else if (guess < num) {
            System.out.println("猜小了");
        }else{
            System.out.println("恭喜你猜对了");
        }
        int num1=(int) (Math.random()*1000+1);

        /*
        System.out.println("猜吧");
        int guess=scan.nextInt();
        while (guess!=num1) {
            if (guess > num1) {
                System.out.println("猜大了");
            } else {
                System.out.println("猜小了");
                System.out.println("猜吧");
            }
            guess = scan.nextInt();


        }
        System.out.println("节日快乐");

         */

    }
}
